home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Communications Toolbox / CTB Development Resources / Simple FT Tool / Simon Tool / FSET.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-11  |  4.4 KB  |  189 lines  |  [TEXT/MPS ]

  1. /************************************************************************************
  2.                                   P R O J E C T   I N F O
  3. *************************************************************************************
  4.   
  5.     Project Name:    Simon
  6.        File Name:    FSET.c
  7.   
  8.      Description:    Contains C code specific to the setup code resource
  9.                      of a simple file transfer tool.  This is where any user 
  10.                     interface is presented.
  11.   
  12.                           Copyright © 1992 Apple Computer, Inc.
  13.                           All rights reserved.
  14.   
  15. *************************************************************************************
  16.                               A U T H O R   I D E N T I T Y
  17. *************************************************************************************
  18.   
  19.       Initials    Name
  20.       --------    -----------------------------------------------
  21.       CH            Craig Hotchkiss
  22.   
  23. *************************************************************************************
  24.                               R E V I S I O N   H I S T O R Y
  25. *************************************************************************************
  26.  
  27.     Change History (most recent first):
  28.  
  29.          <0>      5/8/92    CH        Creation date
  30.  
  31. ************************************************************************************/
  32.  
  33.  
  34.  
  35. /************************************************************************************
  36.                                 STANDARD Mac HEADERS 
  37. ************************************************************************************/
  38.  
  39. #ifdef DUMPFILENAME
  40.     #pragma load DUMPFILENAME
  41. #else
  42.     #define    DoNotDump     1
  43.     #include Load.c
  44. #endif
  45.  
  46.  
  47.  
  48. /************************************************************************************
  49.                                 Other dependent HEADERs
  50. ************************************************************************************/
  51.  
  52. #ifndef __GLOBALS__
  53.     #include "Globals.h"
  54. #endif
  55.  
  56.  
  57.  
  58. /************************************************************************************
  59.      Procedure:    FSET
  60.  
  61.      Purpose:    
  62.  
  63.      Inputs:        
  64.  
  65.      Outputs:
  66. ************************************************************************************/
  67. pascal        long        FSET( FTHandle toolHandle, short message, 
  68.                                 long p1, long p2, long p3 )
  69. {
  70.     long            retValue = ftNotSupported;
  71.     #if Debugging == 1
  72.         #if DefaultDebug == 1
  73.             Str255            tempString;
  74.         #endif
  75.     #endif
  76.     
  77.  
  78. #pragma unused ( p1, p2, p3 )
  79.  
  80.     (**toolHandle).errCode = noErr;
  81.     
  82.     switch ( message ) {
  83.         case ftSpreflightMsg:
  84.                 /*        *********************
  85.                         Parameter Definitions
  86.                         *********************
  87.                     p1:        Unused
  88.                     p2:        Unused
  89.                     p3:        long*                magicCookie - gets allocated here
  90.                     returns:    Handle to the tool's user interface DITL
  91.                 */
  92.                 
  93.             #if Debugging == 1
  94.                 #if ShowMessage == 1
  95.                     DebugStr( "\p FSET/ftSpreflightMsg received.;g" );
  96.                 #endif
  97.             #endif
  98.             
  99.             retValue = nil;
  100.             
  101.             break;
  102.             
  103.         case ftSsetupMsg:
  104.                 /*        *********************
  105.                         Parameter Definitions
  106.                         *********************
  107.                     p1:        Unused
  108.                     p2:        Unused
  109.                     p3:        long*                magicCookie - just passed
  110.                     returns:    nothing
  111.                 */
  112.                 
  113.             #if Debugging == 1
  114.                 #if ShowMessage == 1
  115.                     DebugStr( "\p FSET/ftSsetupMsg received.;g" );
  116.                 #endif
  117.             #endif
  118.             
  119.             break;
  120.             
  121.         case ftSitemMsg:
  122.                 /*        *********************
  123.                         Parameter Definitions
  124.                         *********************
  125.                     p1:        short*                itemHit
  126.                     p2:        Unused
  127.                     p3:        long*                magicCookie - just passed
  128.                     returns:    nothing
  129.                 */
  130.                 
  131.             #if Debugging == 1
  132.                 #if ShowMessage == 1
  133.                     DebugStr( "\p FSET/ftSitemMsg received.;g" );
  134.                 #endif
  135.             #endif
  136.             
  137.             break;
  138.             
  139.         case ftSfilterMsg:
  140.                 /*        *********************
  141.                         Parameter Definitions
  142.                         *********************
  143.                     p1:        EventRecord*        theEvent
  144.                     p2:        short*                itemHit
  145.                     p3:        long*                magicCookie - just passed
  146.                     returns:    Boolean indicating if event was handled.
  147.                 */
  148.                 
  149.             #if Debugging == 1
  150.                 #if ShowMessage == 1
  151.                     DebugStr( "\p FSET/ftSfilterMsg received.;g" );
  152.                 #endif
  153.             #endif
  154.             
  155.             break;
  156.             
  157.         case ftScleanupMsg:
  158.                 /*        *********************
  159.                         Parameter Definitions
  160.                         *********************
  161.                     p1:        Unused
  162.                     p2:        Unused
  163.                     p3:        long*                magicCookie - disposed of here.
  164.                     returns:    nothing
  165.                 */
  166.                 
  167.             #if Debugging == 1
  168.                 #if ShowMessage == 1
  169.                     DebugStr( "\p FSET/ftScleanupMsg received.;g" );
  170.                 #endif
  171.             #endif
  172.             
  173.             break;
  174.             
  175.         default:
  176.             #if Debugging == 1
  177.                 #if DefaultDebug == 1
  178.                     DebugStr( "\p FSET - Did not understand message -- ;g" );
  179.                     NumToString( (long) message, tempString );
  180.                     DebugStr( tempString );
  181.                 #endif
  182.             #endif
  183.             
  184.             break;
  185.     } /* message switch */
  186.     
  187.     return ( retValue );
  188. } /*FSET*/
  189.